try {
  const $form = this.getApiPage().getApiWidgetByAliasName('judge-content')
  const data = $form.widgetObj._option.dataSource

  const options = {
    method: 'POST',
    headers: {
      "Content-type": "application/json",
    },
    body: JSON.stringify({ id: data.id, disableFlag: 3 })
  }

  console.log(data, options);
  fetch('/Event/drillPlanInfo/update', options)
    .then(res => res.json())
    .then(json => {
      const detailCancel = this.getApiPage().getApiWidgetByAliasName('detail-cancel')
      const detailCancelIco = this.getApiPage().getApiWidgetByAliasName('detail-cancel-ico')
      const detailStart = this.getApiPage().getApiWidgetByAliasName('detail-start')
      const detailStartIco = this.getApiPage().getApiWidgetByAliasName('detail-start-ico')

      detailCancel.hideWidget()
      detailCancelIco.hideWidget()
      detailStart.hideWidget()
      detailStartIco.hideWidget()

      this.getApiPage().setVariables([{ name: 'update', value: data.id }])
      //console.log(json);

      const detail = this.getApiPage().getApiWidgetsByClassName('detail')
      detail.forEach(v => v.hideWidget())

      const drillWidget = this.getApiPage().getApiWidgetByAliasName('新增演练人员');
      drillWidget.widgetObj.hide();

    })

} catch (error) {
  console.log(error)
}

